<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="*|/">
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="text()|@*">
    <xsl:value-of select="."/>
  </xsl:template>

  <xsl:template match='nbsp' name='nbsp'>
    <xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
  </xsl:template>

  <xsl:template match="Registration/Step4">

    <script>
      var onRegistrationSubmit = function(e) {

      var ret = validateStep4();
      if( !ret )
      YAHOO.util.Event.preventDefault(e);
      }

      YAHOO.util.Event.addListener("signup_submit", "click", onRegistrationSubmit);
    </script>



    <form name="formRegistration" method="post" action="userProfileChange.aspx?step=5" onSubmit="validateForm();return document.returnValue">
      <center>
        <div class="round_me" style="text-align:left; background:#FEEECC; padding:20px; margin:10px; width:100%;">
          <div class='title'>
            <xsl:value-of select="@title"/>
            <input type="hidden" name="newlyCreatedUserid" value="{/Registration/@newlyCreatedUserid}"/>
          </div>
          <xsl:for-each select='Question'>
            <xsl:choose>
              <xsl:when test='@id="401"'>
                <div class='body' style='padding:10px;'>
                  <xsl:value-of select="@description"/>
                  <br/>
                  <textarea rows="2" cols="65" name="D{@id}" id="D{@id}" style="width:100%;">
                    <xsl:value-of select="@answdescr"/>
                  </textarea>
                  <br/>
                  <span class="shycomment">
                    (<xsl:value-of select="@comment"/>)
                  </span>
                </div>
              </xsl:when>
              <xsl:when test='@id="402"'>
                <div class='body' style='padding:10px;'>
                  <xsl:value-of select="@description"/>
                  <br/>
                  <textarea rows="2" cols="65" name="D{@id}" id="D{@id}" style="width:100%;">
                    <xsl:value-of select="@answdescr"/>
                  </textarea>
                  <br/>
                  <span class="shycomment">
                    (<xsl:value-of select="@comment"/>)
                  </span>
                </div>
              </xsl:when>
              <xsl:when test='@id="403"'>
                <div class='body' style='padding:10px;'>
                  <xsl:value-of select="@description"/>
                  <br/>
                  <textarea rows="2" cols="65" name="D{@id}" id="D{@id}" style="width:100%;">
                    <xsl:value-of select="@answdescr"/>
                  </textarea>
                  <br/>
                  <span class="shycomment">
                    (<xsl:value-of select="@comment"/>)
                  </span>
                </div>
              </xsl:when>
              <xsl:when test='@id="404"'>
                <div class='body' style='padding:10px;'>
                  <xsl:value-of select="@description"/>
                  <br/>
                  <textarea rows="2" cols="65" name="D{@id}" id="D{@id}" style="width:100%;">
                    <xsl:value-of select="@answdescr"/>
                  </textarea>
                  <br/>
                  <span class="shycomment">
                    (<xsl:value-of select="@comment"/>)
                  </span>
                </div>
              </xsl:when>
              <xsl:when test='@id="405"'>
                <div class='body' style='padding:10px;'>
                  <xsl:value-of select="@description"/>
                  <br/>
                  <textarea rows="2" cols="65" name="D{@id}" id="D{@id}" style="width:100%;">
                    <xsl:value-of select="@answdescr"/>
                  </textarea>
                  <br/>
                  <span class="shycomment">
                    (<xsl:value-of select="@comment"/>)
                  </span>
                </div>
              </xsl:when>


            </xsl:choose>
          </xsl:for-each>

          <div style='text-align:right;padding-top:20px;padding-bottom:20px;'>
            <p class="submit">
              <input type="submit" id="signup_submit" name="subbutton" value="Salva e prosegui con Descrizione Libera"></input>
            </p>
          </div>

        </div>
      </center>
      
      <input type="hidden" name="email" id="email" value="{/Registration/user/@email}" />
    </form>


  </xsl:template>

</xsl:stylesheet>